package com.wicket.okrapp.integration.dto;

import com.wicket.okrapp.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Objects;
import javax.validation.constraints.NotNull;
import lombok.Data;

/**
 * @desc EvaObjTargetCycleTargetSetDto
 * @使用场景
 */
@Data
public class EvaObjTargetCycleTargetSetDto
  extends BaseDto
  implements Serializable {

  /**
   * 被评对象目标周期ID
   */
  @NotNull(message = "被评对象目标周期ID不能为空")
  @ApiModelProperty("被评对象目标周期ID")
  private String evaObjTargetCycleId;

  /**
   * 目标值
   */
  @NotNull(message = "目标值不能为空")
  @ApiModelProperty("目标值")
  private Double targetValue;

  /**
   * 是否父周期 TRUE:是 FALSE:否
   */
  @NotNull(message = "是否父周期不能为空")
  @ApiModelProperty("是否父周期")
  private String isParentCycle;

  /**
   * 是否子周期 TRUE:是 FALSE:否
   */
  @NotNull(message = "是否子周期不能为空")
  @ApiModelProperty("是否子周期")
  private String isSubCycle;

  /**
   * 是否中期 TRUE:是 FALSE:否
   */
  @NotNull(message = "是否中期不能为空")
  @ApiModelProperty("是否中期")
  private String isMetaphase;

  /**
   * 被评对象目标设置ID
   */
  @ApiModelProperty("被评对象目标设置ID")
  private String evaObjOsetId;

  /**
   * 起始值
   */
  @ApiModelProperty("起始值")
  private Double targetStartValue;

  /**
   * 诊断值
   */
  @ApiModelProperty("诊断值")
  private Double targetDiagnosticValue;

  /**
   * 周期排序
   */
  @NotNull(message = "周期排序不能为空")
  @ApiModelProperty("周期排序")
  private Long orderNumber;

  /**
   * 冗余单位
   */
  @ApiModelProperty("冗余单位")
  private String unit;

  /**
   * 评价模板评价画像目标周期ID
   */
  @ApiModelProperty("评价模板评价画像目标周期ID")
  private String evaPortraitTargetCycleId;

  /**
   * 一级部门目标任务责任部门目标周期ID
   */
  @ApiModelProperty("一级部门目标任务责任部门目标周期ID")
  private String mLevelEvaObjTargetCycleId;

  /**
   * OKR责任主体部门目标周期ID
   */
  @ApiModelProperty("OKR责任主体部门目标周期ID")
  private String okrDptEvaObjTargetCycleId;

  /**
   * OKR责任主体个人目标周期ID
   */
  @ApiModelProperty("OKR责任主体个人目标周期ID")
  private String okrPsEvaObjTargetCycleId;

  /**
   * 展示目标值
   */
  @ApiModelProperty("展示目标值")
  private Double showTargetValue;

  /**
   * 目标周期简称
   */
  @ApiModelProperty("目标周期简称")
  private String cyclelAlias;

  /**
   * 被评对象内容表主键ID
   */
  @ApiModelProperty("被评对象内容表主键ID")
  private String evaObjEntityId;

  /**
   * 被评对象内容表类型编码 OMS_TARGET_CYCLE:目标周期表 OMS_EVALUATION_OBJECT_TARGET_CYCLE:被评对象目标周期表 OMS_TARGET:目标表 OMS_TARGET_CATEGORY:目标分类表 OMS_TARGET_OBJECTIVE:指标表 OMS_TASK:任务表 OMS_ORG_INDUCTION_RECORD:就职记录表 OMS_FRAMEWORK_ORIGINAL_ROLE_MEMBER:身份人员表 OMS_ORG_DEPT:部门表 OMS_BASE_HOST:宿主表 OMS_FRAMEWORK_SPACE:空间表 OMS_TSPE_CYCLE_STAGE_DATA:周期阶段资料记录 OMS_EVALUATION_TEMPLATE:评价模板 OMS_EVALUATION_PORTRAIT:评价画像表 OMS_ORG_POSITION:职务表 OMS_VIRTUAL_ORG_MEMBER:虚拟组织成员表 OMS_PLANNING:规划资料表 OMS_FRAMEWORK_USERS:个人账号表 OMS_EXECUTE_CYCLE_STAGE:执行周期阶段表 OMS_CONF_SCHEME:配置方案表 OMS_EVA_OBJ_TARGET_CYCLE_OSET:被评对象目标周期目标设置表 OMS_EVA_OBJ_TARGET_CYCLE_WEIGHT_SET:被评对象目标周期权重设置表 OMS_NOTICE:通知公告表 OMS_CYCLE:周期表 OMS_EVALUATION_SUBJECT:评价主题表 OMS_BIZ_APP_BATCH:业务应用批次表 OMS_EVA_BATCH_RELATED_SET:评价模板批次相关设置表
   */
  @ApiModelProperty("被评对象内容表类型编码")
  private String evaObjTableTypeCode;

  /**
   * 被评对象类型编码 EVA_PORTRAIT:评价画像 EVA_OBJECT:评价对象 FLEVEL_OBJ_TASK_DUTY_DEPT:一级部门目标任务责任部门 OKR_SUBJECT_DEPT:OKR责任主体部门 OKR_SUBJECT_PERSONAL:OKR责任主体个人
   */
  @ApiModelProperty("被评对象类型编码")
  private String evaObjTypeCode;

  /**
   * 关联目标内容类型编码 TARGET:目标 TARGET_CATEGORY:目标分类 OBJECTIVE:指标
   */
  @ApiModelProperty("关联目标内容类型编码")
  private String targetCycleContentTypeCode;

  /**
   * 关联目标内容ID
   */
  @ApiModelProperty("关联目标内容ID")
  private String targetCycleContentId;

  /**
   * 冗余目标ID
   */
  @ApiModelProperty("冗余目标ID")
  private String targetId;

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;
    EvaObjTargetCycleTargetSetDto that = (EvaObjTargetCycleTargetSetDto) o;
    return (
      evaObjTargetCycleId == that.evaObjTargetCycleId &&
      targetValue == that.targetValue &&
      isParentCycle == that.isParentCycle &&
      isSubCycle == that.isSubCycle &&
      isMetaphase == that.isMetaphase &&
      evaObjOsetId == that.evaObjOsetId &&
      targetStartValue == that.targetStartValue &&
      targetDiagnosticValue == that.targetDiagnosticValue &&
      orderNumber == that.orderNumber &&
      unit == that.unit &&
      evaPortraitTargetCycleId == that.evaPortraitTargetCycleId &&
      mLevelEvaObjTargetCycleId == that.mLevelEvaObjTargetCycleId &&
      okrDptEvaObjTargetCycleId == that.okrDptEvaObjTargetCycleId &&
      okrPsEvaObjTargetCycleId == that.okrPsEvaObjTargetCycleId &&
      showTargetValue == that.showTargetValue &&
      cyclelAlias == that.cyclelAlias &&
      evaObjEntityId == that.evaObjEntityId &&
      evaObjTableTypeCode == that.evaObjTableTypeCode &&
      evaObjTypeCode == that.evaObjTypeCode &&
      targetCycleContentTypeCode == that.targetCycleContentTypeCode &&
      targetCycleContentId == that.targetCycleContentId &&
      targetId == that.targetId
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(
      super.hashCode(),
      evaObjTargetCycleId,
      targetValue,
      isParentCycle,
      isSubCycle,
      isMetaphase,
      evaObjOsetId,
      targetStartValue,
      targetDiagnosticValue,
      orderNumber,
      unit,
      evaPortraitTargetCycleId,
      mLevelEvaObjTargetCycleId,
      okrDptEvaObjTargetCycleId,
      okrPsEvaObjTargetCycleId,
      showTargetValue,
      cyclelAlias,
      evaObjEntityId,
      evaObjTableTypeCode,
      evaObjTypeCode,
      targetCycleContentTypeCode,
      targetCycleContentId,
      targetId
    );
  }

}
